<!--
描述：校区信息-新增组件
开发人：fwb
开发日期：2017年8月22日
-->

<template lang="pug">
    kalix-dialog.user-add(bizKey="schoolzone" ref="kalixBizDialog" v-bind:form-model.sync="formModel" v-bind:targetURL="targetURL")
        div.el-form(slot="dialogFormSlot")
            div.s-flex
                el-form-item.s-flex_item(label="校区代码" prop="xqdm" v-bind:rules="rules.xqdm" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.xqdm")
                el-form-item.s-flex_item(label="校区名称" prop="zwmc" v-bind:rules="rules.zwmc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zwmc")
            div.s-flex
                el-form-item.s-flex_item(label="校区简称" prop="zwjc" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.zwjc")
                el-form-item.s-flex_item(label="校区地址" prop="dz" v-bind:rules="rules.dz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.dz")
            div.s-flex
                el-form-item.s-flex_item(label="邮编" prop="yb" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.yb")
                el-form-item.s-flex_item(label="火车站" prop="hcz" v-bind:label-width="labelWidth")
                    el-input(v-model="formModel.hcz")
</template>

<script type="text/ecmascript-6">
    import FormModel from './model'
    import {schoolZoneURL} from '../../config.toml'

    export default {
        name: 'SchoolZoneAdd',
        data() {
            return {
                formModel: Object.assign({}, FormModel),
                rules: {
                    xqdm: [{required: true, message: '请输入校区代码', trigger: 'blur'}],
                    zwmc: [{required: true, message: '请输入校区名称', trigger: 'blur'}],
                    dz: [{required: true, message: '请输入校区地址', trigger: 'blur'}]
                },
                targetURL: schoolZoneURL,
                labelWidth: '120px'
            }
        },
        components: {},
        created() {
        },
        methods: {}
    }
</script>

<style scoped lang="stylus">
    .el-form
        padding 30px 70px 30px 20px
</style>
